package com.heima.article.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.heima.model.article.dtos.ArticleHomeDto;
import com.heima.model.article.pojos.ApArticle;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

public interface ApArticleMapper extends BaseMapper<ApArticle> {
    //status 不传代表首页 status = 1 加载更多  2 加载更新
    public List<ApArticle> selectArticleList(IPage<ApArticle> page,
                                             @Param("dto") ArticleHomeDto dto,
                                             @Param("status") Short status);

    public List<ApArticle> selectArticleListByDate(@Param("date") LocalDateTime date);
}
